1. Field of the Invention
The present invention relates to image processing systems. More particularly, the present invention relates to an image processing system that extracts lines of characters, diagrams and the like to provide the result thereof.
2. Description of the Background Art
A basic function of an image processing system is to extract a certain line based on an array of dots of an image such as characters and diagrams by obtaining line components of strokes of a character or tangent and normal lines on a contour of a figure. A typical conventional method of determining the direction of a normal line for each dot on a contour of a figure, for example, is set forth in the following.
First, a figure which is an electronic digitalized image is binarized to have the continuous state of the pixels identified, whereby a contour of a figure is extracted. Because the subject is a digital image, the extracted contour is appreciably uneven. If this is directly subjected to various processing steps, an error will be generated. Therefore, smoothing of the contour itself is carried out. Although smoothing the original diagram image by a filter prior to extracting a contour is an effective means, this is not sufficient for providing a smoothed contour. A smoothing operation for the contour itself is necessary. Smoothing of a contour can be carried out by applying a Gaussian filter and the like within a window centered about a certain point on the contour.
FIG. 2 is a diagram for describing the method of determining the direction of a normal line from a contour smoothed as described above. Referring to FIG. 2, there are three adjacent points of a point 20, a point 21, and a point 22 on a contour 25. In the case of obtaining the direction of the nominal lines of these points as shown in FIG. 2, the tangent line of each point on the contour 25 is obtained. The direction of 90.degree. (or 90.degree. in the opposite direction) with respect to the inclination of that tangent line is the direction of the tangent line. Therefore, obtaining the direction of a normal line is equal to obtaining the inclination of the tangent line of each point on the contour.
The most easy general method to obtain a tangent line includes a method of using the coordinates of adjacent points to obtain the inclination of a tangent line from the difference of the coordinate values. For example the inclination of the tangent line of point 21 can be obtained as follows. Assuming that the coordinate of point 21 is (X1, Y1) and the coordinate of point 22 is (X2, Y2), the inclination of the tangent line of point 21 can be obtained by: EQU (Y2-Y1)/(X2-X1) (1)
When the configuration of the contour is a simple one such as a circle, or when the arrangement of adjacent array of dots do not differ greatly in the proximity of a certain point, the direction of a tangent line can be predicted in high accuracy by obtaining the tangent line from the difference of the coordinate values. However, when the configuration of the contour is complex and not smooth, it will be difficult to predict a tangent line in high accuracy from the difference of the coordinate values due to the fact that the coordinate values are discrete values based on a digital image. Although the contour can further be smoothed using a filter and the like to improve the accuracy of a tangent line with respect to the smoothed contour line, the shape of the extracted contour per se may be modified. There is a possibility of the information concerning the configuration of the original contour being dropped significantly. Another possible measure is to carry out correction by interpolating the result determined by difference with the information of an adjacent point. However, this approach can not basically improve the accuracy of the direction of a tangent line because this interpolation is carried out on the basis that the entire contour is smooth.
Prediction of a tangent line can be carried out, not by the difference, but by a Hough transform. Hough transform is known as a method of predicting a line in accuracy based on several points distributed in a line manner. By using all the points within a certain range centered about each point on a contour, a tangent line can be obtained by predicting a straight line that passes through these points in the highest precision. However, because Hough transform identifies the most appropriate straight line upon calculation where all the candidate points are converted into polar coordinates, this method is time-consuming in comparison with the case where the difference of the coordinate values is used. Particularly, when the figure is great in size and the contour is long, a great amount of calculation time is required. Although a Hough transform can provide a straight line detection of high accuracy, there is a disadvantage of requiring a lengthy calculation time period. Therefore, in most cases, normal line detection is carried out using the difference of the coordinate values.